#include <stdio.h>
#include <stdlib.h>

struct elem_data {
    void *data;
    struct elem_data *leader;
    int rank;
};
typedef struct elem_data element;

struct UF_DS {
	element **sets;
	size_t size;
};

typedef struct UF_DS Ufds;

Ufds* UF_alloc (size_t size);

int UF_dealloc (Ufds *);
//element* makeSet (void *);
int UF_find (Ufds *ds, int );
void UF_union (Ufds *ds, int x, int y); 


